package com.twu.biblioteca;

public class bookItem {

    private Book isCopyOf;
    private Boolean reservationStatus;

    public bookItem(Boolean status){
        this.reservationStatus = status;
    }

    public Boolean isReserved(){
        return reservationStatus;
    }

    public void setReservationStatus(Boolean reserved){
        reservationStatus = reserved;
    }

    // Adds a copy of that book, to the store, while updating details of the book
    // isCopyOf holds the type of book to which the copy belongs

    public void addBookItem(Book book){
        isCopyOf = book;
        isCopyOf.bookCopies.add(this);
        if(this.isReserved())
            isCopyOf.reserveCopyCount++;
    }

}
